<!DOCTYPE html>
<html class="no-js" lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>疫情信息管理后台</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" th:href="@{/assets/css/bootstrap.mincopy.css}">
    <link rel="stylesheet" th:href="@{/assets/css/font-awesome.min.css}">
    <link rel="stylesheet" th:href="@{/assets/css/metisMenu.css}">
    <link rel="stylesheet" th:href="@{/assets/css/typography.css}">
    <link rel="stylesheet" th:href="@{/assets/css/styles.css}">
    <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css" />

</head>

<body>
<div id="preloader">
    <div class="loader"></div>
</div>
<!-- preloader area end -->
<!-- page container area start -->

<div class="page-container">
    <!-- sidebar menu area start -->
    <div class="sidebar-menu">
        <div class="main-menu">
            <div class="menu-inner" style="width: 100%; height: 500px; overflow: hidden;">
                <nav>
                    <ul class="metismenu" id="menu">
                        <li >
                            <a href="javascript:void(0)" aria-expanded="true">
                                <span>用户信息统计</span>
                            </a>
                            <ul class="collapse">
                                <li><a th:href="@{/admin/getUsersUnpostToday}">查询今天未打卡用户</a></li>
                            </ul>
                            <ul class="collapse">
                                <li><a th:href="@{/admin/getUsersUnhealthyToday}">查询今天身体不适用户</a></li>
                            </ul>

                            <ul class="collapse">
                                <li><a th:href="@{/admin/jumpToGetRecordsByTime}">按时间查询</a></li>
                            </ul>

                        </li>





                        <li class="active">
                            <a href="javascript:void(0)" aria-expanded="true">
                                <span>用户管理</span>
                            </a>
                            <ul class="collapse">
                                <li class="active"><a th:href="@{/admin/getAllUsers}">用户信息</a></li>
                            </ul>

                            <ul class="collapse">
                                <li ><a th:href="@{/admin/jumpToAddUserInput}">添加新用户</a></li>
                            </ul>
                        </li>







                        <li>
                            <a href="javascript:void(0)" aria-expanded="true">
                                <span>管理员管理模块</span>
                            </a>

                            <ul class="collapse" >
                                <li><a th:href="@{/root/getAllAdmins}">管理账号</a></li>
                            </ul>
                            <ul class="collapse" >
                                <li><a th:href="@{/root/jumpToAddAdminInput}">增加管理员</a></li>
                            </ul>
                        </li>
                        <li><a th:href="@{/logout}"><span>退出登录</span></a></li>
                    </ul>
                </nav>
            </div>
        </div>
    </div>
    <!-- sidebar menu area end -->
    <!-- main content area start -->
    <div class="main-content">
        <div class="header-area">
            <div class="row align-items-center">
                <!-- nav button -->
                <div class="col-md-1 col-sm-8 clearfix">
                    <div class="nav-btn pull-left">
                        <span></span>
                        <span></span>
                        <span></span>
                    </div>
                </div>
                <div class="col-md-11 col-sm-8 clearfix">
                    <table>
                    </table>
                </div>
            </div>
        </div>

        <div class="main-content-inner">
            <table class="table table-bordered table-striped table-hover">
                <thead>
                    <tr>
                        <th>账号</th>
                        <th>姓名</th>
                        <th>电话</th>
                        <th>地址</th>
                        <th>身体状况</th>
                        <th>今天是否打卡了</th>
                        <th>账号是否可用</th>
                        <th>冻结</th>
                        <th>解冻</th>
                    </tr>
                </thead>

                <tbody>
                    <tr th:each="userInfo:${userInfos}">
                        <td th:text="${userInfo.username}"></td>
                        <td th:text="${userInfo.name}"></td>
                        <td th:text="${userInfo.phone}"></td>
                        <td th:text="${userInfo.location}"></td>
                        <td th:text="${userInfo.health}"></td>
                        <td th:text="${userInfo.isPostToday}"></td>
                        <td th:text="${userInfo.active}"></td>
                        <td><form th:action="@{/admin/freezeUserByName/}+${userInfo.username}" method="post"><input  value="冻结" type="submit" /></form></td>
                        <td><form th:action="@{/admin/unFreezeUserByName/}+${userInfo.username}" method="post"><input value="解冻" type="submit" /></form></td>
                    </tr>
                </tbody>


            </table>
        </div>

    </div>

</div>

<script th:src="@{/assets/js/vendor/jquery-2.2.4.min.js}"></script>
<!-- bootstrap 4 js -->
<script th:src="@{/assets/js/bootstrap.min.js}"></script>
<script th:src="@{/assets/js/metisMenu.min.js}"></script>
<script th:src="@{/assets/js/scripts.js}"></script>
</body>

</html>